import request from '@/utils/request'

// 查询分类列表
export function listCategory (query) {
  return request({
    url: '/biz/category/list',
    method: 'get',
    params: query
  })
}

// 查询分类详细
export function getCategory (rid) {
  return request({
    url: '/biz/category/' + rid,
    method: 'get'
  })
}

// 新增分类
export function addCategory (data) {
  return request({
    url: '/biz/category/addCategory',
    method: 'post',
    data: data
  })
}

// 修改分类
export function updateCategory (data) {
  return request({
    url: '/biz/category/updateCategory',
    method: 'put',
    data: data
  })
}

// 删除分类
export function delCategory (rid) {
  return request({
    url: '/biz/category/delCategory/' + rid,
    method: 'delete'
  })
}
